import React, {PureComponent} from 'react'
import Table from '../component/quality/table'
import '../../css/technique.scss'
import Mask from '../component/mask/mask'
import Detail from '../component/base/base-detail'

class QualityWarn extends PureComponent {
    constructor() {
        super()
        this.state = {
            mask: false,
            detail:{}
        }
    }

    setMask = (mask) => {
        this.setState({
            mask
        })
    }

    handClick = (value)=>{
        this.setState({
            mask:true,
            detail:value
        })
    }

    render() {
        return (
            <div className="full-container">
                <Mask show={this.state.mask} hideMask={this.setMask.bind(this,false)}>
                    <Detail detail={this.state.detail}/>
                </Mask>
                <Table onClick={this.handClick}/>
            </div>
        )
    }

}

export default QualityWarn